<script setup>
import { onMounted, ref } from 'vue';
import eventBus from 'vue3-eventbus';
import XinJiView from '@/views/XinJiView.vue';

const gameId = ref(0);

const handleSocketMessage = (message) => {
    let { type } = message;
    switch (type) {
        case 'system':
            gameId.value = message.game_id;
            break;
    }
};

onMounted(() => {
    eventBus.on('socket-message', handleSocketMessage);
});

</script>

<template>  
  <XinJiView />
</template>

<style scoped lang="less">
@font-face {
    font-family: 'Square721BT';
    src: url('./assets//xinJi/font/Square721BT.otf') format('opentype');
}
</style>